<div class="page">
	<div class="page-header">
		<h3><i class="icon-awesome-table icon-large"></i><span class="divider"></span><?php echo __('Fornecedores');?>&nbsp;<small><?php echo ('Lista todos os fornecedores cadastrados');?></small></h3>
		<div class="page-header-optins pull-right">
			<?php echo $this->Html->link('<i class="icon-plus icon-white"></i>'.__('Adicionar Fornecedores'), array('action' => 'add'), array('escape' => false, 'class' => 'btn btn-primary')); ?>
		</div>
	</div>
	<div class="page-content">	
		<form class="well form-search">
			<fieldset>
				<label>CNPJ</label>
	  			<input type="text" class="input-medium" placeholder="CNPJ do Fornecedor">
		  		<label>Fornecedor</label>
		  		<input type="text" class="input-xlarge" placeholder="Razao Social ou Nome Fantasia">
  				<button type="submit" class="btn btn-primary">Pesquisar</button>
	  		</fieldset>
		</form>
	<table class="table table-bordered table-striped">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('nome_fantasia');?></th>			
			<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	</thead>
	<tbody>
	<?php
	foreach ($fornecedors as $fornecedor): ?>
	<tr>
		<td><?php echo h($fornecedor['Fornecedor']['id']); ?>&nbsp;</td>
			<td><?php echo h($fornecedor['Fornecedor']['nome_fantasia']); ?>&nbsp;</td>
		<td class="actions">
					<?php echo $this->Html->link('<i class="icon-eye-open icon-white"></i>', array('action' => 'view',$fornecedor['Fornecedor']['id']), array('escape' => false, 'class' => 'btn btn-primary btn-mini')); ?>
					<?php echo $this->Html->link('<i class="icon-pencil icon-white"></i>', array('action' => 'edit', $fornecedor['Fornecedor']['id']), array('escape' => false, 'class' => 'btn btn-primary btn-mini')); ?>
					<?php echo $this->Form->postLink('<i class="icon-trash icon-white"></i>', array('action' => 'delete', $fornecedor['Fornecedor']['id']), array('escape' => false, 'class' => 'btn btn-danger btn-mini'), __('Are you sure you want to delete # %s?', $fornecedor['Fornecedor']['id'])); ?>
				</td>
	</tr>
<?php endforeach; ?>
	</tbody>
	</table>
	</div>
	<div class="page-footer">
		<div class="row-fluid">
			<div class="span5">
			<p>
			<?php
			echo $this->Paginator->counter(array(
			'format' => __('Página {:page} de {:pages}, exibindo de {:start} a {:end} de {:count} registros')
			));
			?>	</p>
			</div>
		
			<div class="span7 pagination">
				<ul>
				<?php
					echo $this->Paginator->prev(__('previous'), array('tag' => 'li'), null, array('class' => 'disabled', 'tag' => 'li'));
					echo $this->Paginator->numbers(array('separator' => '', 'tag' => 'li', 'currentClass' => 'active'));
					echo $this->Paginator->next(__('next'), array('tag' => 'li'), null, array('class' => 'disabled', 'tag' => 'li'));
				?>
				</ul>
			</div>
		</div>
	</div>
</div>
